<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="pragma" content="no-cache"> 
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> 
<meta http-equiv="expires" content="0"> 
<title>我的证件</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
<link rel="stylesheet" href="assets/css/rz.css">

</head>
<body>
	<div class="page-group">
		<div class="page page-current" id="index">
			<header class="bar bar-nav">
				<a href="customer/me" id="back" class="button button-link button-nav pull-left back" external>
					<span class="icon icon-left"></span> 返回
				</a>
				<h1 class='title'>我的证件</h1>
			</header>
			 
			<!-- 页面正文 -->
			<div class="content">
			<form action="customer/updateIdentityCard" id="form" method="post">
				<div class="list-block">
					<ul>
						<!-- Text inputs -->
						<li>
							<div class="item-content">
								<div class="item-media">
									<i class="icon icon-form-email"></i>
								</div>
								<div class="item-inner">
									<div class="item-title label">证件类型</div>
									<div class="item-input">
										<div class="item-input">
											<select id="type" name="type">
												<c:if test="${identityCard.type=='身份证'}">
												<option value="身份证" selected>身份证</option>
												<option value="护照">护照</option>
												<option value="军官证">军官证</option>
												</c:if>
												<c:if test="${identityCard.type=='护照'}">
												<option value="身份证" >身份证</option>
												<option value="护照" selected>护照</option>
												<option value="军官证">军官证</option>
												</c:if>
												<c:if test="${identityCard.type=='军官证'}">
												<option value="身份证" >身份证</option>
												<option value="护照">护照</option>
												<option value="军官证" selected>军官证</option>
												</c:if>
												<c:if test="${identityCard.type!='身份证'&&identityCard.type!='护照'&&identityCard.type!='军官证'}">
												<option disabled selected style='display:none;'>请选择证件类型</option>
												<option value="身份证" >身份证</option>
												<option value="护照">护照</option>
												<option value="军官证">军官证</option>
												</c:if>
											</select>
										</div>
									</div>
								</div>
							</div>
						</li>
					</ul>
				</div>
				<div class="list-block">
					<ul>
						<!-- Text inputs -->
						<li>
							<div class="item-content">
								<div class="item-media">
									<i class="icon icon-form-email"></i>
								</div>
								<div class="item-inner">
									<div class="item-title label">证件号码</div>
									<div class="item-input">
										<input id="code" name="code" type="text" placeholder="请输入证件号码" value="${identityCard.code}" />
									</div>
								</div>
							</div>
						</li>
					</ul>
				</div>
				<div class="list-block">
					<ul>
						<!-- Text inputs -->
						<li>
							<div class="item-content">
								<div class="item-media">
									<i class="icon icon-form-email"></i>
								</div>
								<div class="item-inner">
									<div class="item-title label">证件有效期</div>
									<div class="item-input">
													<c:if test="${identityCard.validDate==null||identityCard.validDate.isEmpty()}">
													<input type="date" name="validDate"
														value="2020-01-01"> <label class="label-switch">
														<input type="checkbox" name="isLongTermValid" value="长期有效">
														<div class="checkbox"></div>
													</label>长期有效
													</c:if>
													<c:if test="${identityCard.validDate.equals('长期有效')}">
													<input type="date" name="validDate"
														value=""> <label class="label-switch">
														<input type="checkbox" name="isLongTermValid" checked="true" value="长期有效">
														<div class="checkbox"></div>
													</label>长期有效
													</c:if>
													<c:if test="${identityCard.validDate!=null&&!identityCard.validDate.isEmpty()&&!identityCard.validDate.equals('长期有效')}">
													<input type="date" name="validDate"
														value="${identityCard.validDate}"> <label class="label-switch">
														<input type="checkbox" name="isLongTermValid" value="长期有效">
														<div class="checkbox"></div>
													</label>长期有效
													</c:if>
												</div>
								</div>
							</div>
						</li>
					</ul>
				</div>
				
				<div class="content-block">
					<div class="row">
						<div class="col-100">
							<input id="uuid" name="uuid" hidden=true type="text" value="${identityCard.uuid}"/>
							<!-- <a id="submit" href="customer/me" class="button button-big button-fill button-success">保&nbsp;&nbsp;&nbsp;&nbsp;存</a> -->
							<input type="submit" name="submit" id="submit" class="button button-big button-fill button-success" value="保&nbsp;&nbsp;&nbsp;&nbsp;存" />
						</div>
					</div>
				</div>
				</form>
			</div>
		</div>
	</div>
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/js/jquery.validate.js"></script>
	<script src="assets/js/messages_zh.js"></script>
	<script src="assets/js/validate_expand.js"></script>
	<script src="assets/js/customer/updateIdentityCard.js"></script>
</body>
</html>
